package com.mida.dms.knw.api;

import com.mida.dms.knw.entity.vo.KnwIndividualVo;
import com.mida.dms.knw.entity.vo.KnwIndividualVos;
import com.mida.dms.knw.entity.vo.KnwSlotVo;
import com.mida.dms.knw.vo.IndividualParmVo;
import com.mida.dms.knw.vo.KnwIndividualPageVo;
import com.mida.dms.knw.vo.PageResultVo;
import com.mida.tool.common.result.ActionResult;
import com.mida.tool.common.result.ListResult;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.DependsOn;
import org.springframework.web.bind.annotation.*;

import java.util.List;
@DependsOn("loadFromDatabasePropertyConfig")
@FeignClient(name = "KnwIndividualApi", url = "dms.knw.feign.url")
//@FeignClient(name = "KnwIndividualApi", url = "${dms.knw.feign.url}")
public interface KnwIndividualApi {
    @ApiOperation(value = "保存实例", notes = "保存实例")
    @PostMapping(value = "/knwIndividual/saveKnwIndividual",produces = { "application/json;charset=UTF-8" })
    @ResponseBody
    public ActionResult save(@RequestBody KnwIndividualVo t);

    @ApiOperation(value = "删除实例", notes = "删除实例")
    @ApiImplicitParam(name = "soid", value = "实例soid", required = false)
    @GetMapping(value = "/knwIndividual/deleteKnwIndividual")
    @ResponseBody
    public ActionResult delete(@RequestParam(value = "soid") long soid);

    /**
     *分页查询实例
     */
    @ApiOperation(value = "分页查询实例", notes = "分页查询实例")
    @PostMapping(value = "/knwIndividual/findPage",produces = { "application/json;charset=UTF-8" })
    @ResponseBody
    public ListResult<PageResultVo<KnwIndividualVo>> findPage(@RequestBody KnwIndividualPageVo vo);

    /**
     * 查询本体下所有实例
     */
    @ApiOperation(value = "查询本体下所有实例", notes = "查询本体下所有实例")
    @PostMapping(value = "/knwIndividual/findAll",produces = { "application/json;charset=UTF-8" })
    @ResponseBody
    public ListResult<List<KnwIndividualVo>> findAll(@RequestBody KnwIndividualPageVo vo);

    /**
     * 批量禁用
     * @return
     */
    @GetMapping(value = "/knwIndividual/stopSize")
    public ActionResult stopSize(@RequestParam(name = "soids", required = true) String soids);

    /**
     * 批量启用
     * @return
     */
    @GetMapping(value = "/knwIndividual/openSize")
    public ActionResult openSize(@RequestParam(name = "soids", required = true) String soids);

    /**
     * 初始化实例生成页面
     * @param noumenonSoid
     * @return
     */
    @ApiOperation(value = "查询所有本体Slot下对应的编码体系", notes = "查询所有本体Slot下对应的编码体系")
    @GetMapping(value = "/knwIndividual/showIndividualInit")
    @ResponseBody
    public ListResult<List<KnwSlotVo>> showIndividualInit(@RequestParam(value = "noumenonSoid") Long noumenonSoid);

    /**
     * 实例列表生成
     * @param individualParmVo
     * @return
     */
    @PostMapping(value = "/knwIndividual/getIndividualList",produces = { "application/json;charset=UTF-8" })
    @ResponseBody
    public ListResult<List<KnwSlotVo>> getIndividualList(@RequestBody IndividualParmVo individualParmVo);

    @ApiOperation(value = "批量保存实例", notes = "批量保存实例")
    @PostMapping(value = "/knwIndividual/saveKnwIndividualSolt",produces = { "application/json;charset=UTF-8" })
    @ResponseBody
    public ActionResult saveKnwIndividualSolt(@RequestBody KnwIndividualVos t);

    /**
     *获取分页查询实例
     */
    @ApiOperation(value = "获取分页查询实例", notes = "获取分页查询实例")
    @PostMapping(value = "/getKnwIndividualPage",produces = { "application/json;charset=UTF-8" })
    @ResponseBody
    public ListResult<PageResultVo<KnwIndividualVo>> getKnwIndividualPage(@RequestBody KnwIndividualPageVo vo);
}
